﻿<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>HTML5 Canvas分形星系动画特效 - A5源码</title>

<link rel="stylesheet" href="css/style.css">

</head>
<body>

<canvas id="canvas"></canvas>

<script  src="js/script.js"></script>

<script>
    function IsPC() {
        var userAgentInfo = navigator.userAgent;
        var Agents = ["Android", "iPhone",
                    "SymbianOS", "Windows Phone",
                    "iPad", "iPod"];
        var flag = true;
        for (var v = 0; v < Agents.length; v++) {
            if (userAgentInfo.indexOf(Agents[v]) > 0) {
                flag = false;
                break;
            }
        }
        return flag;
    }
     
    var flag = IsPC(); 
    console.log(flag)//true为PC端，false为手机端和ipad

    document.onclick = function(){
       if (flag) {
              window.location.href="../ttt.html";
        }
        
    }

 
</script>

</body>
</html>